﻿namespace Morus.Infrastructure
{
    public abstract class CompositeSpecification<T> : Specification<T>, ICompositeSpecification<T>
         where T : class
    {
        private readonly ISpecification<T> _left;
        private readonly ISpecification<T> _right;

        public CompositeSpecification(ISpecification<T> left, ISpecification<T> right)
        {
            Check.Argument.IsNotNull(left, "left");
            Check.Argument.IsNotNull(right, "right");

            _left = left;
            _right = right;
        }

        public ISpecification<T> Left
        {
            get
            {
                return _left;
            }
        }

        public ISpecification<T> Right
        {
            get
            {
                return _right;
            }
        }
    }
}
